<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="DAO.AdminDao" %>
<%@page import="VO.Admin" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <base href="<%=basePath%>
  ">
  <meta charset="utf-8">
  <title>管理员退出</title>
  <link rel="stylesheet" type="text/css" href="css/public.css">
  <link rel="stylesheet" type="text/css" href="css/exist.css">

  <meta http-equiv="pragma" content="no-cache">
  <meta http-equiv="cache-control" content="no-cache">
  <meta http-equiv="expires" content="0">
  <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  <meta http-equiv="description" content="This is my page">
  <!--
  <link rel="stylesheet" type="text/css" href="styles.css">--></head>

<body>
<div id="mainbody">
  <div id="text">
    <div class="title" >登录跳转</div>
    <div id="msg">
        <% 
String info=(String)request.getAttribute("info"); 
  if(info!=null){ 
  out.print(info); 
  } 
 Admin ad=(Admin)session.getAttribute("ad"); 
   if(ad!=null){
    out.println("<br>3秒后，自动返回主页面");
response.setHeader("Refresh","3;URL=ad_index.jsp");
   %>

  <br> <br><%=ad.getAccount()%> 登录成功！
  
  
  <%
}else{
out.print("对不起，你还没登录！");
out.println("<br>经过3秒之后，将自动返回主页面");
response.setHeader("Refresh","3;URL=login.jsp"); //注意该方法的写法
}
%>

      </div>
  </div></div>
</body>
</html>